#include <Arduino.h>
#include "ESP8266WiFi.h"

void setup() {
    Serial.begin(9600);
    WiFi.mode(WIFI_STA);    //设置为终端模式
    WiFi.begin("dayuan","19900625");   //连网，wifi名和密码
    while(WiFi.status()!=WL_CONNECTED){    //检查wifi状态是否连接上
        delay(100);
        Serial.println("retry connect wifi....");
    }
    Serial.print("IP:");         //连接上了，就打印IP
    Serial.println(WiFi.localIP());
}

void loop() {

}